<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>唤醒app测试页</title>
    <h1>在站外唤醒app时不能使用?x=x的传参模式 如果需要传参 请使用路由传参</h1>

    <style>
        h1 {
            position: absolute;
            margin: auto auto;
            left: 0;
            right: 0;
            top: 20%;
            width: 90%;
            font-size: 3rem;
        }

        .test {
            position: absolute;
            margin: auto auto;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            width: 40%;
            text-align: center;
            line-height: 250px;
            height: 250px;
            font-size: 3rem;
            background: rgba(200, 0, 0, 1);
        }
    </style>



</head>

<body>

    <div class="main">
        <a class="test" onclick="test()"> 唤醒app</a>
        <div>
            <a id="test_a" href="https://front.dongqiudi.com/app.html?type=dongqiudi:///url/http://10.18.7.108:8080/webapp/hankook.html">t't't't't't't't't't't't't't</a>
            




</body>

<script>
    window.browers = {};
    var ua = navigator.userAgent.toLowerCase();
    browers.iPad = ua.match(/ipad/);
    browers.iPhone = ua.match(/iphone/);
    browers.Android = ua.match(/android/);
    browers.iOS = ua.match(/ipad|iphone|ios/);
    browers.ie = ua.match(/iemobile/);
    browers.isWifi = ua.match(/nettype\/wifi|technology\/wifi/);
    browers.force_ssl = ua.match(/Android (5|6)/i);
    browers.is_ios_6 = ua.match(/iOS 6/i);
    browers.is_liveapp = ua.match(/LiveApp/i);
    // 判断是否是app客户端内
    var ua_dqd = ua.match(/NewsApp\/([\d\.]+)/i);


    // var tmp_url = 'https://test1-n.dongqiudi.com/webapp/pic1.html'
    var tmp_url = 'http://10.18.7.108:8080/webapp/hankook.html'
    
    function test() {
        console.log('111');
        if (browers.iOS) {
            console.log(222);
            // window.location.href = "https://front.dongqiudi.com/app.html?type=dongqiudi:///url/" + tmp_url
            $('#test_a').click()
        } else { // 安卓(其他)逻辑
            console.log(333);
            location.href = 'dongqiudi:///url/' + tmp_url
        }
    }
</script>

</body>

</html>